#ifndef Metadata
#define Metadata
#include "LogFile.h"

extern LogFile *logFile;

class metadata
{
	char* fileID;
    string filename;
    uint32_t fileSize;
    char *sha1;
    char *nonce;
    list<string> keywords;
    bitset<1024> bitVector;

public:
    metadata();
    metadata(string filename,uint32_t filesize,char *sha1, char *nonce,list<string> kw,bitset<1024> bitvector,char *fileID);
    metadata(char *parseResponse,uint32_t resLen, char *fileID);
    metadata(string filename,uint32_t filesize, char *sha1, char *nonce,char* kwChr,uint32_t kwLen,char* bitvectorStr,char *fileID);
   
    metadata(metadata &md);
   
    void readMetadata(char* buffer);
    int writeMetadata(char* buffer);
    uint32_t getMetadataLen();

	bitset<1024> getBitVector();
    uint32_t getFileSize();
    string getFilename();
	string getFileID();
    string getFileIDHex();
    string getSHA1Hex();
    string getNonceHex();
    list<string> getKeywords();
    char *getNonce();
    char *getSha1();
    void setFilename(string filename);
    uint32_t getKeywordsLength();
    char * getKeywordsChr(char *keywords);
    void setFileID(string FileId);
    char * getMetadataChr(char *mdChar,uint32_t *mdLen);
   
};

#endif 
